<div class="wide form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'invoice-form',
	'enableAjaxValidation'=>true,
)); ?>

	<p class="note"><?php echo Yii::t('main','Fields with')?> <span class="required">*</span> <?php echo Yii::t('main','are required.')?></p>

	<?php echo $form->errorSummary($model); ?>

	<?php echo $form->hiddenField($model, 'user_id')?>

	<div class="row">
		<?php echo $form->labelEx($model,'contract'); ?>
		<?php echo $form->textField($model,'contract'); ?>
		<?php echo $form->error($model,'contract'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'username'); ?>
		<?php echo $form->textField($model,'username',array('size'=>60,'maxlength'=>60)); ?>
		<?php echo $form->error($model,'username'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'cost'); ?>
		<?php echo $form->textField($model,'cost'); ?>
		<?php echo $form->error($model,'cost'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton(Yii::t('main','Preview')); ?>
		
		<?php echo CHtml::hiddenField('print','');?>
		<?php if ($showPreview) echo CHtml::submitButton(Yii::t('main','Print'),array('onClick'=>'javascript:this.form.print.value="true"; this.form.submit();')); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->